<!--Start Breadcrumb-->
<div class="row">
    <div id="breadcrumb" class="col-xs-12">

    </div>
</div>
<!--End Breadcrumb-->
<!--Start Dashboard 2-->

<div class="row-fluid">



        
                    <div class="row">
	<div class="col-xs-12">
		<div class="box">
			<div class="box-header">
				<div class="box-name">
					
					<span>Feria</span>
				</div>
				<div class="box-icons">
					<a class="collapse-link">
						<i class="fa fa-chevron-up"></i>
					</a>
					<a class="expand-link">
						<i class="fa fa-expand"></i>
					</a>
					
				</div>
				<div class="no-move"></div>
			</div>
			<div class="box-content no-padding">
				<table class="table table-bordered table-striped table-hover table-heading table-datatable" id="datatable-3">
					<thead>
						<tr>
							<th>Fecha</th>
                                                    <th>Sector</th>
                                                    <th>Punto</th>
                                                    <th>Tipo de Feria</th>
                                                    <th>Estado</th>
                                                    <th>Municipio</th>
                                                    <th>Parroquia</th>
                                                    <th>Modificar o Eliminar</th>
						</tr>
					</thead>
                                        <tbody id="tb">
						
					</tbody>
					<tfoot>
						<tr>
							<th>Fecha</th>
                                                    <th>Sector</th>
                                                    <th>Punto</th>
                                                    <th>Tipo de Feria</th>
                                                    <th>Estado</th>
                                                    <th>Municipio</th>
                                                    <th>Parroquia</th>
                                                    <th>Modificar o Eliminar</th>
						</tr>
					</tfoot>
				</table>
			</div>
		</div>
	</div>
</div>
                
            <!--End datos Tab 1-->


      

    <div class="clearfix"></div>
    
</div>

<!--End Dashboard 2 -->

<script type="text/javascript">

// Run Select2 on element
    function tabla() {
     
        $.ajax({
            type: "post",
            url: "../get/tabla",
            dataType: "json",
            data: {tabla: 3},
            success: function(data) {
                if (data['success']){
                   
                    $('#tb').html('');
                        $.each( data['dato'], function( key, value ) {
                          
                           $('#tb').append('<tr><td>'+value['datefecha']+'</td><td>'+value['strlocalidad']+'</td><td>'+value['strpunto']+'</td><td>'+value['tipoferia']+'</td><td>'+value['estado']+'</td><td>'+value['municipio']+'</td><td>'+value['parroquia']+'</td><td> <button type="button" href="feria_editar?id='+value['clvferia']+'"> <img src="../includes/img/modificar.jpg"  height="25" width="25"></button>   </td></tr>');
                           
                             });
                         $('button').click( function (e){
        
      
         
            e.preventDefault();
            
            var url = $(this).attr('href');
            window.location.hash = url;
       
           LoadAjaxContent('feria/' + url);
        
    }); 
               
                }else {
                        jError('ERROR : '+data['mensaje'], {
                         VerticalPosition : 'center',
                         HorizontalPosition : 'center'
                     });
                    }
   
            }
        });


    }
    function AllTables(){
	
	TestTable3();
	
}
    $(document).ready(function() {
        // Load script of Select2 and run this
        
 LoadDataTablesScripts(AllTables);
        tabla();
        $('.form-control').tooltip();
      
        
        

        // Load script of Select2 and run this
        DashboardTabChecker();
        WinMove();
    });
</script>
